package com.bby.common.exception;

public class BBYException extends Exception {

    public int code;

    public BBYException(int code) {
        this.code = code;
    }

    public BBYException(String message) {
        super(message);
        code=500;
    }

    public BBYException(int code, String message) {
        super(message);
        this.code = code;
    }
    public BBYException(int code, String message,Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public BBYException(int code, Throwable cause) {
        super(cause);
        this.code = code;
    }

    public BBYException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, int code) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
